package com.company;


import com.company.service.Apple;
import com.company.service.Fruit;
import com.company.service.Orange;

public class Task2 {


    public static void main(String[] args) {
        //todo 2.编写一个泛型方法，使之能处理所有Fruit子类的集合；
        dealFruit(new Apple());
        dealFruit(new Orange());

    }

    public static <T extends Fruit> void dealFruit(T t) {
        System.out.println(t);
    }


}
